Const npmax = 4
    Public nnin(npmax) As Integer
    Public nnout(npmax) As Single
    Public state1(npmax) As Integer  ' From master to slave
    Public state2(npmax) As Integer  ' From slave to master
    Public sync0(npmax) As Integer    ' Synchronistaion key
    Public sync1(npmax) As Integer    ' Synchronistaion key
    Public syncarray(10) As Integer
    Public npl(npmax) As Integer
    Public np As Integer, npreq As Integer

    Public Const StartSt As Integer = 1, ActiveSt As Integer = 2, FinishedSt As Integer = 3, CancelSt As Integer = 4, Endst As Integer = 5
    Public trace_pp As Integer



    Public Sub MainPP()

        Dim i As Integer
        np = 1
        trace_pp = Val(Form1.TPPtrace.Text)          ' Parallel Programming
        npreq = Val(Form1.TNproc.Text)
        If npreq = 0 Then trace_pp = 0

        Assign(npreq)
        For i = 1 To 4 : nnout(i) = 0 : Next i
        For i = 1 To 4 : sync0(i) = 0 : Next i
        For i = 1 To 4 : sync1(i) = 0 : Next i
        Form4.Tnp.Text = np
        Form4.TNproc.Text = npreq
        Form4.Monitor()

    End Sub